#include<bits/stdc++.h>
using namespace std;
inline int read()
{
    int num=0,fh=1;
    char c=getchar();
    while(c<'0'||c>'9')
    {
        if(c=='-')fh=-fh;
        c=getchar();
    }
    while(c>='0'&&c<='9')
    {
        num=num*10+c-'0';
        c=getchar();
    }
    return num*fh;
}
int n;
const int N=2e5+7;
int a[N];
int cmp(int x11,int x22)
{
    return x11<x22;
}
int js=0;
int ft=0;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++)a[i]=read();
    sort(a+1,a+n+1,cmp);
    a[n+1]=1e7;
    js=1;
    int r=1;
    for(int i=1;i<=n;i++)
    {
        while(a[r]<=a[i])
        {
            r++;
        }
        if(a[i]<a[n])ft++;
        r++;
    
        if(r>n)break; 
    }
    cout<<n-ft<<endl;
    return 0;
}         